<?php
/* @var $this CustomerController */

$this->breadcrumbs=array(
	'Customer',
);
?>
<h1><?php echo $this->id . '/' . $this->action->id; ?></h1>


<p>
	<form >
		<table>
			<tr>
				<td>
					ID
				</td>
				<td>
					Name
				</td>
				<td>
					Age
				</td>
				<td>
					Create
				</td>
				<td>
					Edit
				</td>
				<td>
					Delete
				</td>
			</tr>
			<?php
			//foreach($table as $key=>$row)
				foreach($models as $model)
				{
					
			?>
				<tr>
					<td>
						<?php echo $model->attributes['id']; ?>
					</td>
					<td>
						<?php echo $model->attributes['name']; ?>
					</td>
					<td>
						<?php echo $model->attributes['Age']; ?>
					</td>
					<td>
						<input type="button" value="create a new record"  id="b1" onClick="window.location.href='http://localhost/myfirstapp/index.php?r=customer/create'" />
	
					</td>
					<td>
						<input type="button" value="Edit a record"  id="b2"  onClick="window.location.href='http://localhost/myfirstapp/index.php?r=customer/edit&id=<?php echo $model->attributes['id']; ?>'"/>
					</td>
					<td>
						<input type="button" value="Delete a record"  id="b3" onClick="window.location.href='http://localhost/myfirstapp/index.php?r=customer/delete&id=<?php echo $model->attributes['id']; ?>'" />
					</td>
				</tr>
			<?php 
				}
			?>
		</table>
	</form>
</p>
